#include <stdio.h>
#include "cache.h"


int main(void)
{
 unsigned char test[32] = "qwertyuiopasdfghjklzxcvbnmab";
 unsigned char cache[32] = "qwertyuiopasdfghjklzxcvbnmab";
// unsigned char cache[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
 unsigned char bog = 'a', t;

 //Next in cache test
 for(char idx = 0; idx <= sizeof(test)-1; idx++)
 {
  printf("Next in line : %s\n",test);
  NextInCache(test, sizeof(test));
 }
 //New to Cache test
 for(char idx = 0; idx <= sizeof(cache)-1; idx++)
 {
  printf("New To Cache : %s\n", cache);
  NewToCache(cache, sizeof(cache), bog);
  bog++;
  if(bog == '{')
	bog = 'a';
 }
 // Next in Cache and New to cache test
 printf("----------------------------------------\n");
 printf("Name of test : in array  : byte\n");
 printf("----------------------------------------\n");
 bog = 'a';
 for(char idx = 0; idx <= sizeof(cache); idx++)
 {
  t = NextInCache(cache, sizeof(cache));
  printf("Caching test : %s : %c - %x | %d | %c - %x - %d\n", cache, t, t, idx, bog, bog, bog);
  NewToCache(cache, sizeof(cache), bog);
  bog++;
  if(bog == '{')
	bog = 'a';
 }
 
 return 0;
}

